fix: remove PR_SET_PDEATHSIG that kills Chrome after ~10s idle (#1157)#1173
Merged
fix: remove PR_SET_PDEATHSIG that kills Chrome after ~10s idle (#1157)#1173
Conversation
v0.24.1 introduced `prctl(PR_SET_PDEATHSIG, SIGKILL)` in #1137 to kill Chrome when the daemon dies. However, `PR_SET_PDEATHSIG` tracks the **thread** that called `fork()`, not the process (`prctl(2)` documents this). Chrome is spawned via `tokio::task::spawn_blocking`, whose threads are reaped after ~10 seconds of idle time. When the blocking thread exits, the kernel sends SIGKILL to Chrome even though the daemon is still alive. Symptoms reported in #1157: - `tab list` shows `about:blank` after a few seconds - `snapshot` returns an empty page - All Chrome processes exit ~9 seconds after launch - Any workflow involving navigation or waiting breaks The fix removes `PR_SET_PDEATHSIG` from the Chrome `pre_exec` hook. Orphan cleanup is already handled by the process-group kill (`kill(-pgid, SIGKILL)`) in `ChromeProcess::kill()`, which runs via daemon signal handlers, `close_notify`, idle timeout, and `Drop`. Fixes #1157
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v0.24.1 introduced
prctl(PR_SET_PDEATHSIG, SIGKILL)in #1137 to kill Chrome when the daemon dies. However,PR_SET_PDEATHSIGtracks the thread that calledfork(), not the process (prctl(2)documents this). Chrome is spawned viatokio::task::spawn_blocking, whose threads are reaped after ~10 seconds of idle time. When the blocking thread exits, the kernel sends SIGKILL to Chrome even though the daemon is still alive.Symptoms reported in #1157:
tab listshowsabout:blankafter a few secondssnapshotreturns an empty pageThe fix removes
PR_SET_PDEATHSIGfrom the Chromepre_exechook. Orphan cleanup is already handled by the process-group kill (kill(-pgid, SIGKILL)) inChromeProcess::kill(), which runs via daemon signal handlers,close_notify, idle timeout, andDrop.Fixes #1157